home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / OS / FWMenu / FWMenus.fr < prev    next >
Encoding:
Text File  |  1996-09-17  |  3.0 KB  |  124 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWMenus.fr
  4. //    Release Version:    $ ODF 2 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWMENUS_FR
  11. #define FWMENUS_FR
  12.  
  13. #ifndef FWARCOBJ_FR
  14. #include "FWArcObj.fr"
  15. #endif
  16.  
  17. #ifndef FWSTRING_FR
  18. #include "FWString.fr"
  19. #endif
  20.  
  21. #ifndef FWMENUS_K
  22. #include "FWMenus.k"
  23. #endif
  24.  
  25. //========================================================================================
  26. // type FW_RMenuItem
  27. //========================================================================================
  28.  
  29. type FW_RMenuItem : FW_RArchivableObject(Label='mnit')
  30. {
  31. Index:
  32.     integer = 1;
  33.     integer = FW_kPrivIDOnly;
  34. OwnerMenuClass:
  35.     longint = '•ERR';        // Must be set by subtype
  36.     integer = FW_kPrivIDOnly;
  37. OwnerMenuID:
  38.     longint = '•ERR';        // Must be set by subtype
  39. };
  40.  
  41. //========================================================================================
  42. // type FW_RSeparatorItem
  43. //========================================================================================
  44.  
  45. type FW_RSeparatorItem : FW_RMenuItem(Label='seit')
  46. {
  47. };
  48.  
  49. //========================================================================================
  50. // type FW_RTextItem
  51. //========================================================================================
  52.  
  53. type FW_RTextItem : FW_RMenuItem(Label='txit')
  54. {
  55. CommandID:
  56.     longint;
  57. MenuKey:
  58.     integer;
  59. ItemString:
  60.     FW_RStringData;
  61. };
  62.  
  63. //========================================================================================
  64. // type FW_RToggleItem
  65. //========================================================================================
  66.  
  67. type FW_RToggleItem : FW_RTextItem(Label='tgit')
  68. {
  69. OtherText:
  70.     FW_RStringData;
  71. };
  72.  
  73. //========================================================================================
  74. // type FW_RPullDownMenu
  75. //========================================================================================
  76.  
  77.  
  78. type FW_RPullDownMenu : FW_RArchivableObject(Label='pdmn')
  79. {
  80.     auto ownerClass = 0;
  81.     set ownerClass = gClassID;
  82.     auto ownerMenu = 0;
  83.     set ownerMenu = gObjectID;
  84.  
  85. MenuTitle:
  86.     FW_RStringData;
  87. MenuItems:
  88.     integer = $$CountOf(MenuItemArray);
  89.     array MenuItemArray
  90.     {
  91.         FW_RMenuItem(Index=$$ArrayIndex(MenuItemArray), 
  92.                      OwnerMenuClass=ownerClass, 
  93.                      OwnerMenuID=ownerMenu);
  94.     };
  95. };
  96.  
  97. //========================================================================================
  98. // type FW_RSubMenuItem
  99. //========================================================================================
  100.  
  101. type FW_RSubMenuItem : FW_RMenuItem(Label='suit')
  102. {
  103. SubMenu:
  104.     FW_RPullDownMenu;
  105. };
  106.  
  107. //========================================================================================
  108. // type FW_RMenuList
  109. //========================================================================================
  110.  
  111. type FW_RMenuBar(FW_kMenuBarResourceType)
  112. {
  113.     AboutString:
  114.         FW_RStringData;
  115.  
  116.     integer = $$CountOf(PullDownMenuArray);
  117.     array PullDownMenuArray
  118.     {
  119.         FW_RPullDownMenu;
  120.     };
  121. };
  122.  
  123. #endif
  124.